package org.nstack.header.zone;

import org.nstack.header.message.APIEvent;
import org.nstack.header.rest.RestResponse;

import java.sql.Timestamp;



@RestResponse(allTo = "inventory")
public class APICreateZoneEvent extends APIEvent {

    private ZoneInventory inventory;

    public APICreateZoneEvent() {
        super(null);
    }

    public APICreateZoneEvent(String apiId) {
        super(apiId);
    }

    public ZoneInventory getInventory() {
        return inventory;
    }

    public void setInventory(ZoneInventory inventory) {
        this.inventory = inventory;
    }
 
    public static APICreateZoneEvent __example__() {
        APICreateZoneEvent event = new APICreateZoneEvent();
        ZoneInventory zone = new ZoneInventory();
        zone.setName("TestZone");
        zone.setUuid(uuid());
        zone.setDescription("Test");
        zone.setState("Enabled");
        zone.setType(" nstack");
        zone.setCreateDate(new Timestamp(System.currentTimeMillis()));
        zone.setLastOpDate(new Timestamp(System.currentTimeMillis()));
        event.setInventory(zone);
        return event;
    }

}
